package net.towee.client.event.core;

import net.towee.client.com.app.AppController.Component;

import com.google.gwt.event.shared.GwtEvent;

public class ShowComponentEvent extends GwtEvent<ShowComponentEventHandler> {
	public static Type<ShowComponentEventHandler> TYPE = new Type<ShowComponentEventHandler>();
	private final Component component;
	private final String[] params;

	public ShowComponentEvent(Component com, String... params) {
		this.component = com;
		this.params = params;
	}
	
	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<ShowComponentEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(ShowComponentEventHandler handler) {
		handler.onShowComponent(component, params);
	}

}
